package com.qiyang.mq;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.amqp.core.Queue;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Created on 2018/6/8.
 *
 * @author sehuaqi.
 * 描述：配置队列
 */
@Configuration
public class RabbitConfig {

    Logger logger = LoggerFactory.getLogger(RabbitConfig.class);

    @Bean
    public Queue helloQueue(){

        logger.info(">>>>>RabbitConfig:创建队列 [hello] ");

        return new Queue("hello");
    }

    @Bean
    public Queue UserQueue(){

        logger.info(">>>>>RabbitConfig:创建队列 [user_q] ");

        return new Queue("user_q");
    }

}
